package com.example.mytayunapi.Service;
import com.example.mytayunapi.Mapper.collectInfoMapper;
import com.example.mytayunapi.Entity.collectInfo;
import com.example.mytayunapi.Vo.CollectandProducts;
import com.example.mytayunapi.Vo.VCollectResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Service
public class collectInfoServiceImpl implements collectInfoService{
    @Autowired
    private collectInfoMapper collectInfoMapper;
    @Override
    public Integer insertcollectInfo( VCollectResp collectInfo) {
        return collectInfoMapper.insertcollectInfo(collectInfo);
    }

    @Override
    public List<CollectandProducts> getProductCollectInfo(String schoolDegree) {
        return collectInfoMapper.getProductCollectInfo(schoolDegree);
    }

    @Override
    public Integer deleteProductCollect(String schoolDegree, Long productId) {
        Integer i = collectInfoMapper.deleteProductCollect(schoolDegree, productId);
        return i;
    }


}
